//
//  WXFindCollectionViewCell.m
//  Big Show
//
//  Created by dlios on 15-5-14.
//  Copyright (c) 2015年 Big_Q. All rights reserved.
//

#import "WXFindCollectionViewCell.h"


@interface WXFindCollectionViewCell ()
// label 写用于发现最好的自己
//@property (nonatomic, retain) UILabel *label1;
// 放一张大图片
@property (nonatomic, retain) UIImageView *imageView;
// 图片下写好标语
@property (nonatomic, retain) UILabel *label2;

@end
@implementation WXFindCollectionViewCell

- (void)dealloc
{
//    [_label1 release];
    [_imageView release];
    [_label2 release];
    [super dealloc];
}

-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
//        self.label1 = [[UILabel alloc] init];
//        [self.contentView addSubview:_label1];
//        [_label1 release];
        
        self.imageView = [[UIImageView alloc] init];
        [self.contentView addSubview:_imageView];
        [_imageView release];
        
        self.label2 = [[UILabel alloc] init];
        [self.contentView addSubview:_label2];
        [_label2 release];
    }
    return self;
}

-(void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes
{
//    _label1.frame = CGRectMake(70, 0, self.contentView.frame.size.width, 40);
////    _label1.text = @"从此刻起, 做回最纯粹的自己";

    _imageView.frame = CGRectMake(10, 0, self.contentView.frame.size.width - 20, 150);
    _imageView.backgroundColor = [UIColor redColor];

    _label2.frame = CGRectMake(10, 150, self.contentView.frame.size.width - 20, 40);
     _label2.text = @"发现下的标语";
}

-(void)setFindModel:(XHFindModel *)findModel
{
    if (_findModel != findModel) {
        [_findModel release];
        _findModel = [findModel retain];
    }
//    _label1.text = @"从此刻起, 做回最纯粹的自己";
//    _imageView.backgroundColor = [UIColor redColor];
//    _label2.text = @"发下下的标语";
}
@end
